package cn.tedu.spring2205.week02.aop;

import org.springframework.stereotype.Component;

@Component
public class MyAopBean {

    public void addUser(){
        System.err.println("添加用户开始");
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.err.println("添加用户完成");
    }

    public void findUserByName(){
        System.err.println("查询用户开始");
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.err.println("查询用户结束");
    }

    public void deleteUser(){
        System.err.println("删除用户开始");
        try {
            Thread.sleep(4000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.err.println("删除用户结束");
    }

}
